package com.ischoolbar.programmer.service.home.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ischoolbar.programmer.dao.home.CollectDao;
import com.ischoolbar.programmer.entity.home.Collect;
import com.ischoolbar.programmer.service.home.CollectService;

@Service
public class CollectServiceImpl implements CollectService{

	@Autowired
	private CollectDao collectDao;

	@Override
	public int add(Collect collect) {
		// TODO Auto-generated method stub
		return collectDao.add(collect);
	}

	@Override
	public Collect findByTeaName(Map<String,Object> queryMap) {
		// TODO Auto-generated method stub
		return collectDao.findByTeaName(queryMap);
	}

	@Override
	public List<Collect> findList(Map<String, Object> queryMap) {
		// TODO Auto-generated method stub
		return collectDao.findList(queryMap);
	}

	@Override
	public int getTotal(Map<String, Object> queryMap) {
		// TODO Auto-generated method stub
		return collectDao.getTotal(queryMap);
	}

	@Override
	public int delete(String id) {
		// TODO Auto-generated method stub
		return collectDao.delete(id);
	}

	@Override
	public int deleteByAccountId(Long accountId) {
		// TODO Auto-generated method stub
		return collectDao.deleteByAccountId(accountId);
	}

	@Override
	public int deleteByProductId(Long productId) {
		// TODO Auto-generated method stub
		return collectDao.deleteByProductId(productId);
	}
	
}
